package com.yllt4cloud.common.ddbase.constant.entity;


import com.yllt4cloud.common.core.util.ResultResp;

import java.util.Optional;

public class ServiceException extends RuntimeException{

	private ResultResp resultResp = null;


    public ServiceException(ResultResp resultResp) {
        super(Optional.ofNullable(resultResp).map(ResultResp::getErrorMsg).orElse("业务发生异常"));
        this.resultResp = resultResp;
    }

    public ResultResp getResultResp() {
        return resultResp;
    }
}
